<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>06angular双向绑定</title>
</head>
<body ng-app="app">
    <div ng-controller="demoController">
        <input type="text" ng-model="msg">
        <span>{{msg}}</span>
        <button ng-click="show()">显示</button>
    </div>
</body>
<script src="libs/angular.min.js"></script>
<script>
    var app = angular.module("app",[]);
    app.controller("demoController",["$scope",function($scope){
        $scope.show = function(){
            alert($scope.msg);
        }
    }])
</script>
</html>